/**
 * （社保、公积金）编号管理api
 */

import axios from '@/libs/api.request'
export default class systemApi {
  // 获取编号列表 1社会保险、2公积金
  static getCodeList = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/GetList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 删除
  static deleteCode = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/Delete',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 查看时获取详情
  static getCodeDetail = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/GetModel',
      method: 'get',
      params: params
    })
  }

  // 新增时获取详情
  static addModalInfo = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/GetAddModel',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取方案列表 1社会保险、2公积金
  static getPlanOptions = (params) => {
    return axios.request({
      url: '/SysWelfarePercentAreaConfig/GetPlanList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 保存
  static saveReviseCode = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/Save',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取商保编号列表
  static getCICodeList = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/GetList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取商保编号详情
  static getCICodeDetail = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/GetModel',
      method: 'get',
      params: params,
      enctype: 'multipart/form-data'
    })
  }

  // 保存商保编号
  static saveReviseCICode = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/Save',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 删除商保编号
  static deleteCICode = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/Delete',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 导出模板
  static exportTemplate = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/ExportTemplate',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  // 导出错误模板
  static exportErrorTemplate = (name) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/ExportErrorFile?fileName=' + name,
      method: 'get',
      responseType: 'blob'
    })
  }

  // 导出编号
  static exportCode = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/Export',
      method: 'post',
      data: params
    })
  }

  // 导出商保编号
  static exportCommercialCode = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/Export',
      method: 'post',
      data: params,
      responseType: 'blob'
    })
  }
  // 导出商保编号模板
  static exportCiCodeTemplate = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/ExportTemplate',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  // 导出商保错误数据附件
  static exportCiCodeErrorFile = (params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/ExportErrorFile',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }

  // 服务形式下拉
  static GetSelectIdList = (params) => {
    return axios.request({
      url: '/SysBasedata/GetSelectIdList?type=ServiceForm',
      method: 'get',
      params: params
    })
  }

  static Enabled =(params) => {
    return axios.request({
      url: '/SysWelfarePercentNoConfig/EnabledList ',
      method: 'post',
      data: params
    })
  }

  static EnabledCommercial =(params) => {
    return axios.request({
      url: '/SysWelfarePercentNoCommercialConfig/EnabledList ',
      method: 'post',
      data: params
    })
  }
  
}
